package br.ufmg.notservice.service;

import br.ufmg.notservice.activity.NotificationConstants;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class NotificationReceiver extends AbstractReceiver {

	
	@Override
	public void onReceive(Context context, Intent intent) {
		super.onReceive(context, intent);
		Log.i(getClass().getSimpleName(), intent.getStringExtra(NotificationConstants.NOTIFICATION_MESSAGE));
		intent = new Intent(NotificationConstants.NOTIFICATION_SERVICE); 
		intent.setClass(context, getServiceClass());
		startService(context, intent);
	}

	@Override
	protected Class<?> getServiceClass() {
		return NotificationService.class;
	}

}
